<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/7/21
  Time: 15:32
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String path = request.getContextPath();
    String basepath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    System.out.println("basepath:"+basepath);
%>
<%--<%@taglib prefix="c" uri="http://java.sun.com/jstl/core" %>--%>
<%--<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>--%>
<%--<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>--%>
<%--<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>--%>
<%--<%@taglib  uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>--%>
<!DOCTYPE html>
<html>
<head>
    <base href="<%=basepath %>" />
    <meta charset="UTF-8">
    <title>小朋银行</title>
</head>
<link rel="stylesheet" href="/css/apply.css">
<link rel="stylesheet" href="/css/index.css">
<script src="js/jquery-3.1.1.min.js"></script>
<body>

<!--头部连接-->
<div class="header">
    <div class="wraper">
        <!--顶部链接-->
        <div class="topLink">
            <ul>
                <li>
                    <a href="#"><span>xx银行  |</span></a>
                </li>
                <li>
                    <a href="#"><span>加入收藏  |</span></a>
                </li>
                <li>
                    <a href="#"><span>联系我们  |</span></a>
                </li>
                <li class="last">
                    <a href="#"><span>网点查询</span></a>
                </li>
            </ul>
        </div>
        <div class="ll">
            <ul>
                <li>
                    <a href="#">登录</a>
                </li>
                <li>
                    <a href="#">注册</a>
                </li>
            </ul>
        </div>
    </div>
</div>
<!--头部-->
<div class="topSection">
    <div class="wraper">
        <div class="h90">
            <!--logo与城市切换-->
            <div class="l">
                <div class="logo">
                    <a href="#"> <img src="image/log.png" alt="小朋银行" style="width: 90px;height: 90px;">
                    </a>
                </div>
            </div>
            <div class="r">
                <div class="kefuline">
                    <p class="kefu">客服热线：0000-000-000 &nbsp; 0000-000-000</p>
                </div>
            </div>

        </div>

        <div class="nav" id="navigation">
            <ul>
                <li class="focus"><a href="" class="title" title="首页">首页</a>
                </li>
                <li><a href="#" class="title" title="办卡申请">办卡申请</a>
                </li>
                <li><a href="#" class="title" title="">服务2</a>
                </li>
                <li><a href="#" class="title" title="">服务3</a>
                </li>
                <li><a href="#" class="title" title="">服务4</a>
                </li>
                <li><a href="#">服务5</a>
                </li>
                <li><a href="#" title="">服务6</a>
                </li>
                <li><a href="#" title="">服务7</a>
                </li>
                <li class=""><a href="#" title="帮助中心">帮助中心</a>
                </li>
            </ul>
        </div>
    </div>
</div>
<!--主体页面-->
<div class="main">

    <div class="borderWrap">
        <p class="title">您正在申请中国小朋银行信用卡，为确保您申请成功，请务必如实填写如下信息。 </p>
        <div class="form">
            <form id="cardReq" action="credit-user-message/CheckUserMessage" method="post">
                <input type="hidden" value="${name}" name="name" id="name"/>
                <table>
                    <tr>
                        <td class="t1">
                            <span class="f1">姓名：</span>
                        </td>
                        <td class="td2">
                            <input type="text" value="${cpname}" name="cumName" id="cumName"/>
                        </td>
                        <td class="t3">

                        </td>
                    </tr>
                    <tr>
                        <td class="t1">
                            <span class="f1">证件类型：</span>
                        </td>
                        <td class="td2">
                            <input type="text" value="居民身份证" name="cardType" id="cardType" readonly="readonly"/>
                        </td>
                        <td>

                        </td>
                    </tr>
                    <tr>
                        <td class="t1">
                            <span class="f1">身份证号：</span>
                        </td>
                        <td class="td2">
                            <input type="text" value="" name="idCard" id="idCard" onblur="checkname(this.value);"/>
                        </td>
                        <td class="t3">
                            <span class="tip" id="nametip"></span>
                        </td>
                    </tr>
                    <tr>
                        <td class="t1">
                            <span class="f1">手机号：</span>
                        </td>
                        <td class="td2">
                            <input type="text" value="" name="phone" id="phone"/>
                        </td>
                        <td class="t3">

                        </td>
                    </tr>
                    <tr>
                        <td class="t1">
                            <span class="f1">验证码：</span>
                        </td>
                        <td class="td2">
                            <input type="text" value="" name="yzmcode" id="yzmcode"/>
                        </td>
                        <td class="t3">
                            <input type="button" value="获取验证码" id="yzm" onclick="getyzm();"></input>
                        </td>
                    </tr>
                    <tr>
                        <td class="t1">
                            <span class="f1">邮箱：</span>
                        </td>
                        <td class="td2">
                            <input type="text" value="" name="email" id="email"/>
                        </td>
                        <td class="t3">

                        </td>
                    </tr>

                </table>
                <input id="agreed" type="checkbox" name="ifagree"><span>我已阅读并清楚知晓</span>
                <p>
                    <span><a href="#"  class="colff9900">《中国小朋银行信用卡申请须知》</a></span>
                    <span><a href="#"  class="colff9900">《中国小朋银行信用卡章程》</a></span>
                    <span><a href="#"  class="colff9900">《中国小朋银行信用卡领用合约》</a></span>
                    <br>
                </p>
                <div id="b1">
                    <input type="reset" value="取消重填">
                    <input type="submit" value="下一步">
                </div>
            </form>
        </div>
    </div>

</div>
<!--尾部部分-->
</body>
</html>
<script>
    // 实名认证
    function checkname(idcard) {

        var cuname=$("#cumName").val()
        $.ajax({
            url:'credit-user-message/CheckRealName',
            type:'post',
            data:{
                cumName:cuname,
                idCard:idcard
            },
            success:function (data) {
                $('#nametip').html(data);
            }
        });
    };
    //验证手机号
    function getyzm() {

        var phone = $('#phone').val();
        alert(phone);
        $.ajax({
            url: 'credit-user-message/CheckCode',
            type: 'post',
            data:{
                phone:phone
            },
            success:function (data) {

                alert(data);
            }
        });
    }
</script>